package com.eian.boot.module.system.user.model.entity;

import com.eian.boot.mybatis.core.model.BaseEntity;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.time.LocalDateTime;

/**
 * 用户表 实体类。
 *
 * @author alex.meng
 * @since 1.0.0
 */
@EqualsAndHashCode(callSuper = true)
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "t_sys_user")
public class SysUserEntity extends BaseEntity {

    /**
     * 用户名，唯一标识
     */
    @Column(value = "username")
    private String username;

    /**
     * 密码，加密存储
     */
    @Column(value = "password")
    private String password;

    /**
     * 昵称
     */
    @Column(value = "nickname")
    private String nickname;

    /**
     * 邮箱地址
     */
    @Column(value = "email")
    private String email;

    /**
     * 手机号码
     */
    @Column(value = "telephone")
    private String telephone;

    /**
     * 头像URL
     */
    @Column(value = "avatar")
    private String avatar;

    /**
     * 状态：0-禁用，1-启用
     */
    @Column(value = "status")
    private Integer status;

    /**
     * 最后登录时间
     */
    @Column(value = "last_login_time")
    private LocalDateTime lastLoginTime;

    /**
     * 最后登录IP
     */
    @Column(value = "last_login_ip")
    private String lastLoginIp;
}
